import Opt from '@/components/dt/info/Opt.js'

class Column extends Opt {
  constructor() {
    super()
    this.build()
  }

  build() {
    this.createAll()
    this.opts.push(...this.all)
  }

  createAll() {
    this.all = [
      {
        type: 'index',
        title: '序号',
        minWidth: 50,
        fixed: 'left'
      },
      {
        field: 'orgName',
        title: '所属组织',
        minWidth: 160,
        fixed: 'left'
      },
      {
        field: 'housesName',
        title: '案场名称',
        minWidth: 180,
        fixed: 'left'
      },
      {
        title: '基本信息',
        align: 'center',
        children: [
          {
            field: 'agreementValidDate',
            title: '合同有效期',
            minWidth: 130,
            cell: {
              text: {
                type: 'date'
              }
            }
          },
          {
            field: 'commissionWayStr',
            title: '结佣方式',
            minWidth: 100
          },
          {
            field: 'depositPer',
            title: '交房保证金比例(%)',
            minWidth: 150
          },
          {
            field: 'developers',
            title: '开发商',
            minWidth: 180
          },
          {
            field: 'developerAbbreviation',
            title: '开发商简称',
            minWidth: 140
          },
          {
            field: 'isSecurityFund',
            title: '是否有保证金',
            minWidth: 110
          },
          {
            field: 'securityFundMoney',
            title: '保证金金额(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'totalGoodsPrice',
            title: '总货值(亿元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'unitGoodsPrice',
            title: '单边货值(亿元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'costCenterCode',
            title: '成本中心代码',
            minWidth: 150
          },
          {
            field: 'housesStatus',
            title: '案场状态',
            minWidth: 100
          },
          {
            field: 'settlementStatus',
            title: '财务状态',
            minWidth: 100,
            cell: {
              text: {
                type: 'dict',
                key: 'financialStatus'
              }
            }
          },
          {
            field: 'cooperationMode',
            title: '合作模式',
            minWidth: 150
          },
          {
            field: 'enterDate',
            title: '进场日期',
            minWidth: 130,
            cell: {
              text: {
                type: 'date'
              }
            }
          },
          {
            field: 'baseAgentRate',
            title: '代理费率(%)',
            minWidth: 160
          },
          {
            field: 'area',
            title: '签约面积(㎡)',
            minWidth: 110,
            cell: {
              text: {
                type: 'number'
              }
            }
          }
        ]
      },
      {
        title: '签约数据',
        align: 'center',
        children: [
          {
            field: 'totalPrice',
            title: '签约总金额(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'accumulateMoney',
            title: '累计到账房款(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          }
        ]
      },
      {
        title: '累计预估',
        align: 'center',
        children: [
          {
            field: 'preCommAmountSum',
            title: '代理费总额(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'preCommAmount',
            title: '代理费(不含交房)(元)',
            minWidth: 160,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'prePremiumCommAmount',
            title: '溢价(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'preDeliveryCommAmount',
            title: '交房代理费(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'preCommAmountRate',
            title: '综合费率',
            minWidth: 100
          }
        ]
      },
      {
        title: '累计符合条件',
        align: 'center',
        children: [
          {
            field: 'canSettlementTotalSales',
            title: '总销(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'canCommAmountSum',
            title: '代理费总额(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'canCommAmount',
            title: '代理费(不含交房)(元)',
            minWidth: 160,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'canPremiumCommAmount',
            title: '溢价(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'canDeliveryCommAmount',
            title: '交房代理费(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'canCommAmountRate',
            title: '综合费率',
            minWidth: 100
          }
        ]
      },
      {
        title: '累计实际结算',
        align: 'center',
        children: [
          {
            field: 'settlementTotalSales',
            title: '总销(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'settledAgentCostSum',
            title: '代理费总额(含税)(元)',
            minWidth: 160,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'settledAgentCost',
            title: '代理费(不含交房)(元)',
            minWidth: 160,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'settledPremiumAgentCost',
            title: '溢价(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'settledDeliveryAgentCost',
            title: '交房代理费(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'noTaxAmountSum',
            title: '代理费总额(不含税)(元)',
            minWidth: 180,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'settledAgentCostRate',
            title: '综合费率',
            minWidth: 100
          },
          {
            field: 'contractRate',
            title: '签约销售率',
            minWidth: 100
          }
        ]
      },
      {
        title: '已售未确认',
        align: 'center',
        children: [
          {
            field: 'noConfirmAmount',
            title: '总销(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'noConfirmAgentTax',
            title: '代理费(含税)(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'noConfirmAgent',
            title: '代理费(不含交房)(元)',
            minWidth: 160,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'noConfirmPremiumAgent',
            title: '溢价(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'noConfirmDeliveryAgent',
            title: '交房代理费(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'noConfirmRate',
            title: '代理费率',
            minWidth: 100
          }
        ]
      },
      {
        title: '符合条件未结算',
        align: 'center',
        children: [
          {
            field: 'canNoSettlementAmount',
            title: '总销(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'canNoSettlementAgentTax',
            title: '代理费金额(含税)(元)',
            minWidth: 160,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'canNoSettlementAgent',
            title: '代理费(不含交房)(元)',
            minWidth: 160,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'canNoSettlementPremiumAgent',
            title: '溢价(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'canNoSettlementDeliveryAgent',
            title: '交房代理费(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'canNoSettlementRate',
            title: '代理费率',
            minWidth: 100
          }
        ]
      },
      {
        title: '签约未符合条件',
        align: 'center',
        children: [
          {
            field: 'contractNoConditionAmount',
            title: '总销(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'contractNoConditionAgentTax',
            title: '代理费金额(含税)(元)',
            minWidth: 160,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'contractNoConditionAgent',
            title: '代理费(不含交房)(元)',
            minWidth: 160,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'contractNoConditionPremiumAgent',
            title: '溢价(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          },
          {
            field: 'contractNoConditionDeliveryAgent',
            title: '交房代理费(元)',
            minWidth: 140,
            cell: {
              text: {
                type: 'number'
              }
            }
          }
        ]
      },
      {
        field: 'backAmount',
        title: '累计回款(元)',
        minWidth: 140,
        cell: {
          text: {
            type: 'number'
          }
        }
      },
      {
        field: 'shouldSurplus',
        title: '应收账款余额(元)',
        minWidth: 140,
        cell: {
          text: {
            type: 'number'
          }
        }
      },
      {
        field: 'channelCostValue',
        title: '签约预估渠道费用(元)',
        minWidth: 160,
        cell: {
          text: {
            type: 'number'
          }
        }
      },
      {
        field: 'actualChannelCost',
        title: '实际支付渠道费用(元)',
        minWidth: 160,
        cell: {
          text: {
            type: 'number'
          }
        }
      },
      {
        title: '操作',
        width: 150,
        fixed: 'right',
        cell: {
          btn: [
            {
              title: '修改状态',
              event: 'onUpdate'
            },
            {
              title: '入账信息',
              event: 'onCarryto'
            }
          ]
        }
      }
    ]
  }
}

export default Column
